# 使用官方的Node.js镜像作为基础镜像
FROM node:16.17.0

RUN npm config set registry https://registry.npmmirror.com

# Create and define the node_modules's cache directory.
RUN mkdir /usr/src/cache
WORKDIR /usr/src/cache

# Install the application's dependencies into the node_modules's cache directory.
COPY package*.json ./
RUN yarn install

# Create and define the application's working directory.
RUN mkdir /usr/src/app
WORKDIR /usr/src/app

COPY . .




